-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add dimension label and percent of total to charts #3672
Conversation
font-feature-settings: "case" 0, "cpsp" 0, "dlig" 0, "frac" 0, "dnom" 0, | ||
"numr" 0, "salt" 0, "subs" 0, "sups" 0, "tnum", "zero" 0, "ss01", "ss02" 0, | ||
"ss03" 0, "ss04" 0, "cv01" 0, "cv02" 0, "cv03" 0, "cv04" 0, "cv05" 0, | ||
"cv06" 0, "cv07" 0, "cv08" 0, "cv09" 0, "cv10" 0, "cv11" 0, "calt", "ccmp", | ||
"kern"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a comment to explain the motivation here?
export let validPercTotal; | ||
export let hovered; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: types would be nice
const xScale = getContext(contexts.scale("x")) as ScaleStore; | ||
|
||
let hovered: boolean | undefined = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: given hovered
is initialized to false
, it doesn't look like it'll ever be undefined
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few fairly small/straightforward comments, so I'll approve for you to merge when ready
* Show labels instantly for measure charts * Add percTotal to dimension charts * Show labels only for currently hovered chart * Clean up * Prettier fix * Fix spacing, add types * Show perc in label only when context column is percent * Remove unused code
Checklist
Summary
Issue addressed:
#3612
Details:
Chart label PRD
Steps to Verify